<template>
  <h3 :style="{color}">我是孙子组件</h3>
</template>
<script lang='ts'>
  import { defineComponent, inject} from 'vue';
  export default defineComponent({
    name:'ProviseSun',
    setup(){
      // 注入的操作
      const color:string|undefined = inject('color')
      return{
        color
      }
    }
  })
</script>
<style scoped>
</style>